package src{

import flash.display.*;
import flash.events.*;
import src.*;

public class Board extends Object{
	//i'm not making this as movie clip because movie clip is heavier
	//this Board class is used extensively in the AI, so should be as light as possible
	public var owner:String;	//needs to be public, to test the AI result
	public var iPos:Number, jPos:Number;
	public var disp:MovieClip;
	public function Board(i:Number,j:Number, disp:MovieClip = null){
		iPos = i;
		jPos = j;
		this.disp = disp;
		setOwner("");
		if(disp != null){
			disp.infoT.mouseEnabled = false;
			disp.infoT.text = print();
		}
	}
	public function print():String{
		return "("+iPos+","+jPos+")";
	}
	public function setOwner(id:String):void{
		if(disp != null) disp.gotoAndStop(id=="pl"?2:(id==""?1:3));
		owner = id;
	}
	public function get getOwner():String{
		return owner;
	}
}

}